package appapi.dto.bridge;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Optional;

/**
 * 设备告警数据对象
 *
 * @author luocheng
 * @version 1.0
 * @date 2023/09/14 17:06
 */
@Data
public class AlarmDto {
    @ApiModelProperty(value = "设备SN")
    private String deviceSn;
    @ApiModelProperty(value = "时间戳")
    private Long timestamp;
    @ApiModelProperty(value = "上传类别")
    private String alarmUpload;
    @ApiModelProperty(value = "告警内容")
    private String alarmDetail;
    @ApiModelProperty(value = "告警对象")
    private String alarmSource;
    @ApiModelProperty(value = "告警来源")
    private String alarmKind;
    @ApiModelProperty(value = "告警级别")
    private Integer alarmLevel;
    @ApiModelProperty(value = "告警产生时实际值 带单位")
    private String alarmValue;
    @ApiModelProperty(value = "力矩百分比")
    private String alarmRate;
    @ApiModelProperty(value = "添加时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
}
